System and method for determining colors of foreground, and computer readable recording medium therefor

ABSTRACT

Provided are a system and method for determining at least one color of a foreground and a computer readable recording medium therefor. The system includes: a motion detector configured to detect a motion region from an image of an area; and a color determiner configured to determine at least one color of the foreground included in the motion region based on a difference between at least one color of the motion region and at least one color of a background which is a region outside the motion region in the image, for displaying the foreground color with the foreground at a display device.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority from Korean Patent Application No.10-2015-0133092, filed on Sep. 21, 2015, in the Korean IntellectualProperty Office, the disclosure of which is incorporated herein in itsentirety by reference.

BACKGROUND

1. Field

Apparatuses and methods consistent with exemplary embodiments relate todetermining colors of a foreground of an image, and more particularly,to determining foreground colors from a background model and aninaccurately detected foreground in the image.

2. Description of the Related Art

Color determining and sorting techniques are used for determining colorsof objects from images and sorting the determined colors. Thesetechniques are widely used in applications such as image analysis andvideo surveillance including video search, object search, and objecttracking.

In the related art, color determination is carried out by calculating aforeground mask of a moving object using a motion detection technique,and determining a dominant color of a region of the foreground mask as arepresentative color of the object.

The color determination in the related art is significantly affected bythe accuracy of foreground mask calculation. However, a calculatedforeground mask does not often match a moving object because ofalgorithmic limitations.

In most algorithms, a foreground mask is set to be calculated to begreater than the actual region of an object, and thus the foregroundmask may include background pixels.

FIGS. 1A and 1B are exemplary views illustrating results of foregrounddetection performed according to the related art. Referring to FIG. 1B,a region denoted by a dashed line is a foreground mask region calculatedusing an algorithm of the related art, and gray, which is the color ofstairs that people step on in FIG. 1A, is calculated as the dominantcolor, that is, the representative color of the foreground mask region.

For example, although a color that a person intends to perceive inground truth data is the color of a military uniform (for example,green), a totally different color may be detected, and thus, incorrectresults may be obtained in a later video search process.

SUMMARY

One or more exemplary embodiments provide a system and method foraccurately determining foreground colors even from an inaccuratelydetected foreground, and a computer readable recording medium therefor.

Various aspects will be set forth in part in the description whichfollows and, in part, will be apparent from the description, or may belearned by practice of the presented embodiments.

According to one or more exemplary embodiments, there is provided asystem for determining at least one color of a foreground which mayinclude: a motion detector configured to detect a motion region from animage of an area; and a color determiner configured to determine atleast one color of the foreground included in the motion region based ona difference between at least one color of the motion region and atleast one color of a background which is a region outside the motionregion in the image, for displaying the foreground color with theforeground at a display device.

The color determiner may be further configured to generate a colorhistogram of the background and a color histogram of the motion region,obtain a color histogram of the foreground based on a difference betweenthe color histogram of the motion region and the color histogram of thebackground, and determine the color of the foreground from the colorhistogram of the foreground.

The system may further include a background model storage configured tostore background image information of the area, and the color determinermay determine the color of the background from the background imageinformation. The background model storage may be further configured toupdate the background image information periodically or in real timewith respect to the area.

The motion region may include a first section corresponding to theforeground and a second section corresponding to a remaining section ofthe motion region, and the color determiner may be further configured todetermine at least one color of the first section as the color of theforeground.

The background may be a remaining region of the image not including thefirst section.

The system may further include a display device configured to displaythe color of the foreground on a border of the foreground.

According to one or more exemplary embodiments, there is provided amethod of determining at least one color of a foreground. The method mayinclude: detecting a motion region from an image of an area; anddetermining at least one color of the foreground included in the motionregion based on a difference between at least one color of the motionregion and at least one color of a background which is a region outsidethe motion region in the image, for displaying the foreground color withthe foreground at a display device.

The method may further include: generating a color histogram of thebackground and a color histogram of the motion region; obtaining a colorhistogram of the foreground based on a difference between the colorhistogram of the motion region and the color histogram of thebackground; and determining the color of the foreground from the colorhistogram of the foreground.

The method may further include updating the background imageperiodically or in real time.

The motion region may include a first section corresponding to theforeground and a second section corresponding to a remaining section notincluding the first section, and the determining of the color of theforeground may include determining the color of the first section.

The background may be a remaining region of the image not including thefirst section.

The method may further include displaying the color of the foreground ona border of the foreground.

According to one or more exemplary embodiments, a computer readablerecording medium stores a program for executing the foreground colordetermining method.

BRIEF DESCRIPTION OF THE DRAWINGS

These and/or other aspects will become apparent and more readilyappreciated from the following description of the embodiments, taken inconjunction with the accompanying drawings, in which:

FIGS. 1A and 1B are exemplary views illustrating results of foregrounddetection performed according to the related art;

FIG. 2 is a schematic view illustrating a system for determining colorsof a foreground according to an exemplary embodiment;

FIG. 3 is a schematic view illustrating a relationship among aforeground, a background, and a motion region that are included in aframe;

FIGS. 4A to 4C are exemplary views illustrating foreground colordetermining operations according to exemplary embodiments;

FIG. 5 is a schematic view illustrating a system for determining colorsof a foreground according to another exemplary embodiment;

FIG. 6 is an exemplary view illustrating how foreground colors aredisplayed according to another exemplary embodiment;

FIG. 7 is a flowchart illustrating a method of determining colors of aforeground according to an exemplary embodiment;

FIG. 8 is a flowchart illustrating a method of determining colors of aforeground according to another exemplary embodiment; and

FIG. 9 is a flowchart illustrating a method of determining colors of aforeground according to another exemplary embodiment.

DETAILED DESCRIPTION OF THE EXEMPLARY EMBODIMENTS

Reference will now be made in detail to exemplary embodiments which areillustrated in the accompanying drawings, wherein like referencenumerals refer to like elements throughout. In this regard, thepresented embodiments may have different forms and should not beconstrued as being limited to the descriptions set forth herein.Accordingly, the exemplary embodiments are merely described below, byreferring to the figures, to explain aspects of the inventive concept.

In the following description, the technical terms are used only forexplaining the exemplary embodiments while not limiting the inventiveconcept. The terms of a singular form may include plural forms unlessreferred to the contrary. The meaning of “include” or “comprise”specifies a property, a fixed number, a step, a process, an element, acomponent, and a combination thereof but does not exclude otherproperties, fixed numbers, steps, processes, elements, components, andcombinations thereof. It will be understood that although the terms“first” and “second” are used herein to describe various elements, theseelements should not be limited by these terms. Terms are only used todistinguish one element from other elements.

FIG. 2 is a schematic view illustrating a system 100 for determiningcolors of a foreground according to an exemplary embodiment.

Referring to FIG. 2, the foreground color determining system 100 of theexemplary embodiment may include a motion detector 110 and a colordeterminer 120.

The motion detector 110 may detect a motion region from an image. Theimage may be any image obtained or captured using any imaging devicecapable of capturing images. The image may include a background and aforeground. The motion region may correspond to the foreground of theimage and may be detected using a motion detection technique.

The background model storage 120 may store background image informationincluding colors of the background, and the color determiner 130 maydetermine colors of the foreground included in the motion region basedon the difference between colors of the motion region and colors of thebackground stored in the background model storage 120.

In a scene including two regions sharing a boundary, a region that is asubject of perception is referred to as a foreground, and the otherregion is referred to as a background. Generally, a foreground appearsas a front portion, and a background appears as a backward portion.Thus, the terms “foreground” and “background” are used with suchmeanings. However, this is not always the case. A boundary between aforeground and a background appears to be included in the foreground,and the foreground appears to be well defined compared to thebackground. In addition, the foreground looks brighter than thebackground.

In the image shown in FIG. 1 B, a person corresponds to a foreground,and the remaining region of the image (or frame) not including theforeground corresponds to a background.

The foreground color determining system 100 of the exemplary embodimentis provided to accurately determine colors of the foreground, and thusif a region corresponding to the foreground is not accurately detected,it may be difficult to accurately determine the colors of theforeground. Here, the colors determined by the foreground colordetermining system 100 may be one color when the foreground has only onecolor or a dominant color when the foreground has a plurality of colors.

A motion detection technique may be defined as a process of detectingthe position of an object varying relative to the surroundingenvironment or a method of detecting variations of the surroundingenvironment relative to a target object. According to the motiondetection technique, motions may be detected by a mechanical orelectronic method.

An example of a mechanical motion detection technique is a techniquerelated to keyboards. Keys of a keyboard have different positions. If akey is pressed to a certain degree, the key may be turned on, and aletter or digit corresponding to the position of the key may be input.

Examples of an electronic motion detection technique include an opticaldetection technique and an acoustic detection technique. In the opticaldetection technique, the motion of an object may be detected usinginfrared rays or laser beams.

A simple algorithm for detecting motions using an imaging device (suchas a camera) is to compare a current image with a reference image andcount the number of pixels having different data values. Pixels of thecurrent image having data values different from pixel data values of thereference image may be considered as moving pixels, and a region formedby the moving pixels may be determined as a motion region.

In addition to the above-mentioned techniques, many other techniques maybe used to detect motions. However, the accuracy of motion detectionusing such techniques is often low.

A region corresponding to a foreground has to be accurately detectedfrom an image before determining colors of the foreground, and theaccuracy of color determination is significantly affected by theaccuracy of a motion detection technique.

Due to this reason, the foreground color determining system 100 of theexemplary embodiment uses the difference between colors of the motionregion detected using the motion detection technique and colors of thebackground stored in the background model storage 120.

The background model storage 120 stores background image information,and the background image information may be updated periodically or inreal time with respect to an area which is a target of the image. Thebackground image information may be obtained using an imaging devicefixed in position and orientation, and may be stored in each timeperiod.

For example, images may be captured using a plurality of imaging devicesfixed to 1^(st) to n^(th) positions with fixed photographingorientations, and background image information of the images may bestored at intervals of 1 minute, 10 minutes, or 1 hour. The backgroundimage information may be classified into categories reflectingseasonality and may be stored according to the categories so as to takethe seasonal variation of shadows into account.

If the foreground color determining system 100 receives images from animaging device operating for 24 hours a day, the background imageinformation may also be updated 24 hours a day.

In the image shown in FIG. 1A, all the regions except regions of movingpeople may be perceived as a background. Various methods may be used todetect a background from an image captured using an imaging device. Forexample, as described above, a method of comparing a reference imagewith a current image may be used.

As described above, the color determiner 130 extracts foreground colorsfrom the motion region based on the difference between colors of themotion region and colors of the background stored in the backgroundmodel storage 120. Here, the term “colors” indicated in a plural formmay represent a single color, depending on an image which is input tothe foreground color determining system 100. The region denoted using adashed line in FIG. 1B may correspond to a motion region. The motionregion may include a foreground. Generally, the motion region may begreater than the foreground.

A region corresponding to the foreground has to be accurately detectedbefore determining colors from the foreground, so as to accuratelydetermine colors of the foreground. However, since incorrect results areoften obtained when a motion detection technique is used, the colordeterminer 130 considers the difference between colors of the backgroundand colors of the motion region so as to accurately determine colors ofthe foreground even when the motion region is not accurately detected.

The motion region may include a section actually corresponding to theforeground and a section corresponding to the background. In this case,the section of the motion region corresponding to the background, thatis, the remaining area of the motion region not including the sectionactually corresponding to the foreground, may have colors similar tocolors of the background rather than to colors of the foreground.

Thus, the color determiner 130 may determine colors of the foreground byremoving colors corresponding to the background from colors of themotion region. In this manner, although the motion region isinaccurately detected, the foreground color determining system 100 mayaccurately determine the colors of the foreground.

Colors of the background may be obtained from the background imageinformation previously stored in the background model storage 120. Inthis case, a background extracted from an image of an area at the sametime as the time at which the image of the area was captured may be usedto provide the background image information. According to an exemplaryembodiment, a background extracted from an image of the area, which iscaptured immediately before an image of the area from which theforeground colors are to be determined is captured, may be used toprovide the background image information. According to another exemplaryembodiment, a background extracted from an image of the area, which doesnot have any motion information and is captured immediately before animage of the area from which the foreground colors are to be determinedis captured, may be used to provide the background image information.According to still another exemplary embodiment, background imageinformation of an image of the area captured at a similar time undersimilar a weather condition may be used to take seasonality andvariations of the weather into account.

The background model storage 120 may update the background imageinformation periodically or in real time based on images captured usingan imaging device, and thus, when colors are determined from theforeground of the image, the color determiner 130 may provide a properpiece of the background image information according to variables such asthe time and weather at or in which the image is captured.

In addition, when the background image information is stored, thebackground image information may be categorized according to variablessuch as an image capture time or weather at which images are captured,so as to improve the accuracy of foreground color determination.

Since the background image information as described above is used toremove the colors corresponding to the background from the colors of themotion region of the image, the colors of a section in the motion regionexcept another section actually corresponding to the foreground does nothave to be determined directly from this section. Further, the colordeterminer 120 may determine that the colors of the section in themotion region except the other region is substantially similar to or thesame as the colors of the background included in the background imageinformation. Thus, the color determiner 120 may not be configured todetermine any color from the section in the motion region not includedin the foreground to determine the colors of the foreground, therebyreducing the load of the foreground color determining system 100.

FIG. 3 is a schematic view illustrating a relationship among aforeground, a background, and a motion region that are included in aframe.

According to an exemplary embodiment, colors to be determined using theforeground color determining system 100 are colors of the foreground,and in FIG. 3, the foreground corresponds to the lower body of a person.In addition, a motion region detected by the motion detector 110corresponds to a region denoted or enclosed by a dashed line in FIG. 3,and the background corresponds to all regions of the FIG. 3 except theforeground.

An operation of separating a region corresponding to the foreground fromthe frame (image) may first be performed before determining colors fromthe foreground, and the separated region may correspond to the motionregion. The motion region may be detected consistent with theforeground. However, if the motion region is detected inconsistent withthe foreground, the colors of the foreground may not be accuratelydetermined.

Due to this, the foreground color determining system 100 of theexemplary embodiment determines colors of the motion region including asection corresponding to the background, and removes colors of thesection corresponding to the background from the colors of the motionregion.

For example, the motion region may include a first section correspondingto the foreground and a second section as the remaining region. That is,the first section corresponds to the foreground, and the second sectioncorresponds to the background. It is desired that the motion regiondetected using the motion detector 110 illustrated in FIG. 2 isaccurately consistent with the foreground. That is, it is desired thatthe first section is accurately detected. However, due to errors of amotion detection operation, the motion region may include the secondsection as well as the first section actually corresponding to theforeground. The second section corresponds to the background and, thesize of the second section may increase as the accuracy of motiondetection decreases.

Thus, it is necessary to remove colors of the second sectioncorresponding to the background from the colors of the motion region soas to determine colors of the first section actually corresponding tothe foreground. This may be described by following formula 1.

C_TF=C_MD−C_FF   (1),

where C_TF refers to the colors of the first section C_MD refers tocolors of the motion region, and C_FF refers to colors of the secondsection.

In addition, since the second section corresponds to the background,colors of the second section may be described by following formula 2.

C_FF=C_BM   (2),

where C_BM refers to the colors of the background.

Substitution of Formula 2 into Formula 1 gives:

C_TF=C_MD−C_BM   [Formula 3]

where C_BM refers to the colors of the background.

As described with reference to FIG. 2, the colors of the background maybe determined using the background image information stored in thebackground model storage 120. Colors of a section actually correspondingto the foreground, that is, the colors of the first section, may bedetermined using information about colors of pixels of the motion regiondetected by the motion detector 110 and information about colors ofpixels of the background obtained from the background image informationstored in the background model storage 120.

At this time, the color determiner 130 extracts pixel color informationcorresponding to pixels included in the motion region from thebackground image information stored in the background model storage 120,and compares the extracted pixel color information with colorinformation of the motion region so as to determine colors of the firstsection.

FIGS. 4A to 4C are exemplary views illustrating foreground colordetermining operations according to exemplary embodiments.

The foreground color detecting operations illustrated in FIGS. 4A to 4Cmay be performed by the color determiner 130 described with reference toFIGS. 2 and 3. Referring to FIGS. 4A to 4C, the color determiner 130generates a color histogram of a motion region and a color histogram ofa background.

The color histograms express distribution of pixel values or brightnessvalues of pixels in an image. In each of the color histograms shown inFIGS. 4A to 4C, the horizontal axis refers to gray level colors, and thevertical axis refers to the frequency of each color.

For example, in the horizontal axis of each of the color histogramsshown in FIGS. 4A to 4C, the rightmost color is black, and thecoordinates of black in an n-bit RGB color coordinate system are (0, 0,0). The third color from the right in the horizontal axis of each colorhistogram is white, and the coordinates of white in the n-bit RGB colorcoordinate system are (2^(n)-1, 2^(n)-1, 2^(n)-1).

In general color histograms, colors are not always expressed asdescribed above. In another example, the horizontal axis of each of thecolor histograms may have RGB color coordinates (0, 0, 0) to (2^(n)-1,2^(n)-1, 2^(n)-1) from the origin to the final color.

FIG. 4A illustrates the color histogram of the motion region, and FIG.4B illustrates the color histogram of the background. FIG. 4Cillustrates a color histogram of a foreground.

As shown in FIGS. 4A to 4C, the color histogram of the foreground may beobtained based on the difference between the color histogram of themotion region and the color histogram of the background.

The color histogram of the motion region shown in FIG. 4A is comparedwith the color histogram of the background shown in FIG. 4B so as tocalculate the difference in each color frequency between the colorhistograms and thus to obtain the color histogram of the foreground.

In the color histogram of the foreground obtained as described above, acolor having the highest frequency may be determined as therepresentative color of the foreground. In FIG. 4C, a color having thehighest frequency is green. Thus, green may be determined as therepresentative color of the foreground and may be determined as thecolor of the foreground.

FIG. 5 is a schematic view illustrating a foreground color determiningsystem 200 according to another exemplary embodiment.

Referring to FIG. 5, the foreground color determining system 200 of theexemplary embodiment includes a motion detector 210, a background modelstorage 220, a color determiner 230, and a color display device 240. Themotion detector 210, the background model storage unit 220, and thecolor determiner 230 are substantially the same as the motion detector110, the background model storage 120, and the color determiner 130described with reference to FIG. 2, and thus repeated descriptionsthereof will be omitted.

The color display device 240 displays colors determined by the colordeterminer 230 on a border of a foreground. In the example shown in FIG.4, if green is detected as the representative color of the foreground,the color display device 240 may display green on the border of theforeground. That is, if an image captured using an imaging device isprovided to the color display device 240, the color display device 240may display the representative color of a foreground of the image on aborder of the foreground.

In addition, the color display device 240 may receive an image signaland may display colors of the foreground of an image corresponding tothe image signal via a display device capable of displaying the image.In this case, the colors of the foreground may be displayed on thedisplay device, or letters corresponding to the colors of the foregroundmay be displayed on the display device.

FIG. 6 is an exemplary view illustrating how foreground colors aredisplayed according to an exemplary embodiment.

As described with reference to FIG. 5, in the foreground colordetermining system 200 of the exemplary embodiment, the foregroundcolors determined using the color determiner 230 are displayed using thecolor display device 240.

Referring to FIG. 6, the color display device 240 may display colors ofthe foreground on a border of a rectangular region including theforeground. For example, if green is detected as the representativecolor of the foreground, the color display device 240 may display theborder of the rectangular region with green. Similarly, if blue isdetected as the representative color of the foreground, the colordisplay device 240 may display the border of the rectangular region withblue.

However, the screen illustrated in FIG. 6 is an example for describing amethod of displaying colors of a foreground. That is, the inventiveconcept is not limited to the method of displaying a color of aforeground on a border of a rectangular region.

The color display device 240 may display letters corresponding to acolor determined from a foreground in a peripheral region of theforeground. For example, a color of a foreground may be displayed on aborder of a rectangular region including the foreground as shown in FIG.6. In another example, however, after a motion region is detected usingthe motion detector 110 or 210 of the exemplary embodiment, a color of aforeground of the motion region may be displayed on a border of themotion region. In addition, as described with reference to FIG. 5,letters corresponding to a color determined from a foreground may bedisplayed at a position around the foreground.

FIG. 7 is a flowchart illustrating a method of determining colors of aforeground according to an exemplary embodiment.

Referring to FIG. 7, the foreground color determining method of theexemplary embodiment includes an operation S110 of detecting a motionregion and an operation S120 of determining colors of a foreground. Inthe motion region detecting operation S110, the motion region may bedetected from an image using a foreground color determining device.

The foreground color extraction method may be performed using theforeground color determining device, and the foreground colordetermining device may include substantially the same elements as theelements of the foreground color determining system 100 or 200 describedwith reference to FIGS. 2 to 6.

The motion region detected in the motion region detecting operation S110may be a region corresponding to the foreground of the image that theforeground color determining device has captured or received, and theimage may be captured using any imaging device capable of capturingimages that may include backgrounds and foregrounds.

Therefore, the motion region may be a region corresponding to theforeground of the image. The motion region may be detected by a motiondetection technique.

In the foreground color determining operation S120, colors of theforeground of the motion region are determined based on the differencebetween colors of the motion region and colors of a backgroundpreviously stored in the foreground color determining device. A regioncorresponding to the foreground has to be accurately detected from theimage before determining colors of the foreground, and the accuracy ofcolor determination is significantly affected by the accuracy of amotion detection technique.

Due to this reason, the foreground color determining method of theexemplary embodiment uses the difference between colors of the motionregion detected using the motion detection technique and colors of thebackground previously stored in the foreground color determining device.

If the accuracy of the motion detection technique is low, the motionregion may include a section other than a section actually correspondingto the foreground. If the section of the motion region actuallycorresponding to the foreground is referred to as a first section, andthe section of the motion region other than the first section isreferred to as a second section, the second section may substantiallycorrespond to the background.

In the foreground color determining operation S120, the colors of theforeground, that is, colors of the first section, may be determinedbased on the difference between the colors of the motion region and thecolors of the background. That is, in the foreground color determiningoperation S120, the colors of the foreground may be determined byremoving the colors corresponding to colors of the background from thecolors of the motion region.

The colors of the background may be obtained from background imageinformation previously stored in the foreground color determiningdevice, and the background image information may be updated periodicallyor in real time. In addition, the background image information may beobtained using an imaging device fixed in position and orientation, andmay be stored in each time period.

For example, images may be captured using a plurality of imaging devicesfixed to 1^(st) to n^(th) positions with fixed photographingorientations, and the background image information of the images may bestored at intervals of 1 minute, 10 minutes, or 1 hour. The backgroundimage information may be classified into categories reflectingseasonality, and may be stored according to the categories so as to takethe seasonal variation of shadows into account.

Thus, when the colors of the foreground of the image are extracted, anaccurate piece of background image information may be used according tofactors such as a time (e.g., season) in or at which the image iscaptured, and thus the accuracy of foreground color determination may beimproved.

FIG. 8 is a flowchart illustrating a method of determining colors of aforeground according to another exemplary embodiment.

Referring to FIG. 8, the foreground color determining method of theexemplary embodiment includes an operation S210 of detecting a motionregion, an operation S220 of generating a color histogram of the motionregion, an operation S230 of generating a color histogram of abackground, an operation S240 of obtaining a color histogram of aforeground, and an operation S250 of determining colors from theforeground.

In the motion region detecting operation S210, the motion region may bedetected from an image using a foreground color determining device. Themotion region detected in the motion region detecting operation S210 maybe a region corresponding to a foreground of the image that theforeground color determining device has captured or received, and theimage may be captured using any imaging device capable of capturingimages that may include backgrounds and foregrounds. Therefore, themotion region may be a region corresponding to the foreground of theimage, and the motion region may be detected by a motion detectiontechnique.

In the operation 240, the color histogram of the foreground may beobtained based on the difference between the color histogram of themotion region generated in the operation S220 and the color histogram ofthe background generated in the operation S230.

As described with reference to FIG. 7, as the accuracy of the motiondetection technique decreases, the motion region may include more of aregion corresponding to the background. In this case, if colorscorresponding to the background are removed from colors of the motionregion so as to determine colors of a region actually corresponding tothe foreground, the accuracy of foreground color extraction may beincreased.

In the foreground color determining method of the exemplary embodiment,color histograms are used for foreground color determination, and in theforeground color determining operation S250, one of colors of theforeground having the highest frequency may be determined as arepresentative color of the foreground.

FIG. 9 is a flowchart illustrating a method of determining colors of aforeground according to another exemplary embodiment.

Referring to FIG. 9, the foreground color determining method of theexemplary embodiment includes an operation S310 of detecting a motionregion, an operation S320 of generating a color histogram of the motionregion, an operation S330 of generating a color histogram of abackground, an operation S340 of obtaining a color histogram of aforeground, an operation 350 of determining colors of the foreground,and an operation S360 of displaying the colors of the foreground.

The operation S310 of detecting the motion region, the operation S320 ofgenerating the color histogram of the motion region, the operation S330of generating the color histogram of the background, the operation S340of obtaining the color histogram of the foreground, and the operation350 of determining the colors of the foreground are the same as theoperation S210 of detecting the motion region, the operation S220 ofgenerating the color histogram of the motion region, the operation S230of generating the color histogram of the background, the operation S240of obtaining the color histogram of the foreground, and the operationS250 of determining the colors of the foreground that are described withreference to FIG. 8.

In the foreground color displaying operation S360, colors determined inthe foreground color determining operation S350 may be displayed on aborder of the foreground. In the example shown in FIG. 4, if green isdetected as a representative color of the foreground, green may bedisplayed on the border of the foreground in the foreground colordisplaying operation S360. That is, in the foreground color displayingoperation S360, the representative color of the foreground of an imagecaptured using an imaging device may be displayed on the border of theforeground.

Alternatively, in the foreground color displaying operation S360, animage signal may be received, and the colors of the foreground of animage corresponding to the image signal may be displayed using a displaydevice capable of displaying the image. In this case, the colors of theforeground may be displayed on the display device, or letterscorresponding to the colors of the foreground may be displayed on thedisplay device.

The inventive concept may also be embodied as computer readable codes ona computer readable recording medium. The computer readable recordingmedium is any data storage device that can store data which can bethereafter read by a computer system. Examples of the computer readablerecording medium include read-only memory (ROM), random-access memory(RAM), CD-ROMs, magnetic tapes, floppy disks, and optical data storage.

The computer readable recording medium can also be distributed overnetwork coupled computer systems so that the computer readable code isstored and executed in a distributed fashion. Also, functional programs,codes, and code segments for accomplishing the inventive concept can beeasily construed by programmers skilled in the art to which theinventive concept pertains.

Operations constituting a method of an exemplary embodiment may beperformed in appropriate order unless explicitly described in terms oforder or described to the contrary. That is, operations are not limitedto the order in which the operations are described. In the presentdisclosure, examples or exemplary terms (for example, “such as” and“etc.”) are used for the purpose of description and are not intended tolimit the scope of the exemplary embodiments unless defined by theclaims. Also, those skilled in the art will readily appreciate that manyalternations, combinations, and modifications may be made according todesign conditions and factors within the scope of the appended claimsand their equivalents.

At least one of the components, elements, modules or units representedby a block as illustrated in FIGS. 2 and 5 may be embodied as variousnumbers of hardware, software and/or firmware structures that executerespective functions described above, according to an exemplaryembodiment. For example, at least one of these components, elements,modules or units may use a direct circuit structure, such as a memory,processing, logic, a look-up table, etc. that may execute the respectivefunctions through controls of one or more microprocessors or othercontrol apparatuses. Also, at least one of these components, elements,modules or units may be specifically embodied by a module, a program, ora part of code, which contains one or more executable instructions forperforming specified logic functions, and executed by one or moremicroprocessors or other control apparatuses. Also, at least one ofthese components, elements, modules or units may further include aprocessor such as a central processing unit (CPU) that performs therespective functions, a microprocessor, or the like. Two or more ofthese components, elements, modules or units may be combined into onesingle component, element, module or unit which performs all operationsor functions of the combined two or more components, elements, modulesor units. Also, at least part of functions of at least one of thesecomponents, elements, modules or units may be performed by another ofthese components, elements, modules or units. Further, although a bus isnot illustrated in the above block diagrams, communication between thecomponents, elements, modules or units may be performed through the bus.Functional aspects of the above exemplary embodiments may be implementedin algorithms that execute on one or more processors. Furthermore, thecomponents, elements, modules or units represented by a block orprocessing steps may employ any number of related art techniques forelectronics configuration, signal processing and/or control, dataprocessing and the like.

As described above, according to the one or more of the above exemplaryembodiments, foreground colors may be accurately determined even from aninaccurately detected foreground using the system, method, and thecomputer readable recording medium.

It should be understood that exemplary embodiments described hereinshould be considered in a descriptive sense only and not for purposes oflimitation. Descriptions of features or aspects within each exemplaryembodiment should typically be considered as available for other similarfeatures or aspects in other exemplary embodiments.

While one or more exemplary embodiments have been described withreference to the drawings, it will be understood by those of ordinaryskill in the art that various changes in form and details may be madetherein without departing from the spirit and scope of the inventiveconcept as defined by the following claims.

What is claimed is:
 1. A system for determining at least one color of aforeground, the system comprising: at least one processor configured toimplement: a motion detector configured to detect a motion region froman image of an area; and a color determiner configured to determine atleast one color of the foreground included in the motion region based ona difference between at least one color of the motion region and atleast one color of a background which is a region outside the motionregion in the image, for displaying the foreground color with theforeground at a display device.
 2. The system of claim 1, wherein thecolor determiner is further configured to generate a color histogram ofthe background and a color histogram of the motion region, obtain acolor histogram of the foreground based on a difference between thecolor histogram of the motion region and the color histogram of thebackground, and determine the color of the foreground from the colorhistogram of the foreground.
 3. The system of claim 1, wherein the colorof the foreground is a representative color which has the highestfrequency in two or more colors of the foreground shown in the colorhistogram of the foreground.
 4. The system of claim 1, furthercomprising a background model storage configured to store backgroundimage information of the area, wherein the color determiner isconfigured to determine the color of the background from the backgroundimage information.
 5. The system of claim 4, wherein the backgroundmodel storage is further configured to update the background imageinformation periodically or in real time with respect to the area. 6.The system of claim 4, wherein the color determiner is configured todetermine the color of the motion region and remove the color of thebackground from the color of the motion region to determine the color ofthe foreground.
 7. The system of claim 6, wherein the background imageinformation comprises information about a background of an image of thearea which is captured before the image comprising the motion region iscaptured with respect to the area.
 8. The system of claim 7, wherein theimage of the area which is captured before the image comprising themotion region is captured does not comprise the motion region.
 9. Thesystem of claim 1, wherein the motion region comprises a first sectioncorresponding to the foreground and a second section corresponding to aremaining section of the motion region.
 10. The system of claim 9,wherein the color determiner is configured to determine at least onecolor of the first section as the color of the foreground, and whereinthe color determiner is not configured to determine any color from thesecond section to determine the color of the background and the color ofthe foreground.
 11. The system of claim 10, wherein the color determineris configured to determine that the color of the second section issubstantially similar to or the same as the color of the background, andremove the color of the second section from the color of the motionregion to determine the color of the foreground.
 12. The system of claim1, further comprising a display device configured to display the colorof the foreground determined by the color determiner on a border of theforeground.
 13. A method of determining at least one color of aforeground, the method comprising: detecting a motion region from animage of an area; and determining at least one color of the foregroundincluded in the motion region based on a difference between at least onecolor of the motion region and at least one color of a background whichis a region outside the motion region in the image, for displaying theforeground color with the foreground at a display device.
 14. The methodof claim 13, further comprising: generating a color histogram of thebackground and a color histogram of the motion region; obtaining a colorhistogram of the foreground based on a difference between the colorhistogram of the motion region and the color histogram of thebackground; and determining the color of the foreground from the colorhistogram of the foreground.
 15. The method of claim 13, furthercomprising: obtaining and storing background image information of thearea; and determining the color of the background from the backgroundimage information.
 16. The method of claim 15, further comprisingupdating the background image information periodically or in real time.17. The method of claim 15, further comprising: determining the color ofthe motion region; and removing the color of the background from thecolor of the motion region to determine the color of the foreground,wherein the background image information comprises information about abackground of an image of the area which does not comprise the motionregion.
 18. The method of claim 13, wherein the motion region comprisesa first section corresponding to the foreground and a second sectioncorresponding to a remaining section not including the first section,wherein the method further comprises determining at least one color ofthe first section as the color of the foreground, and wherein the colorof the foreground and the color of the background are determined withoutdetermining any color from the second section.
 19. The method of claim13, further comprising displaying the color of the foreground on aborder of the foreground.
 20. A computer readable recording mediumstoring a program for executing the method of claim 13.